using System.Windows;
using System.Windows.Controls;
using CommunityToolkit.Mvvm.Messaging;
using Learn.ViewModels;

namespace Learn.Pages;

public partial class DetailPage : Page
{
    public TestViewModel Model
    {
        get => (TestViewModel)DataContext;
    }
    public DetailPage()
    {
        InitializeComponent();
        
    }

    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
        WeakReferenceMessenger.Default.Send<string, string>(
            Model.SelectStudent.Name, "Token1");
    }
}